import { createApp } from 'vue'
// import './style.css'
import App from './App.vue'
import router from './router/index'
import store from './store'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

// 重置样式
import './assets/style/reset.scss'

// vant3样式
import 'vant/es/toast/style'
import 'vant/es/dialog/style'
import 'vant/es/image-preview/style'
import 'vant/es/notify/style'

// vant提示组件全局注册
import { Toast } from 'vant'
import { Dialog } from 'vant'
import { Notify } from 'vant'
import { ImagePreview } from 'vant'

// 全局调用的相关引入
import Util from '@/utils/util'
import Http from '@/utils/axios'

const app = createApp(App)

// 挂载全局引用
app.config.globalProperties.$Util = Util
app.config.globalProperties.$Http = Http
app.config.globalProperties.$Toast = Toast
app.config.globalProperties.$Dialog = Dialog
app.config.globalProperties.$Notify = Notify
app.config.globalProperties.$ImagePreview = ImagePreview

// 引入路由
app.use(router)

// 引入状态管理
app.use(store)

// 使用element ui
app.use(ElementPlus)

app.mount('#app')
